package Day15.poly_.six.Testpro;

/**
 * @author HYHwtx
 * @version 1.0
 * @date 2022/2/22 17:41
 */
public class Teacher extends Person{
    private double money;//工资

    public Teacher(String name, int age, double money) {
        super(name, age);
        this.money = money;
    }

    public double getMoney() {
        return money;
    }

    public void setMoney(double money) {
        this.money = money;
    }

    @Override
    public String say() {
        return super.say()+"，工资是"+money;
    }
    public void teach(){
        System.out.println("老师："+getName()+"，教授javaweb课程。");
    }
}
